Integrand size = 21, antiderivative size = 72 \[ \int \left (a+b \sec ^2(e+f x)\right ) \tan ^5(e+f x) \, dx=-\frac {a \log (\cos (e+f x))}{f}-\frac {(2 a-b) \sec ^2(e+f x)}{2 f}+\frac {(a-2 b) \sec ^4(e+f x)}{4 f}+\frac {b \sec ^6(e+f x)}{6 f} \]
[Out]
Time = 0.08 (sec) , antiderivative size = 72, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {4223, 457, 77} \[ \int \left (a+b \sec ^2(e+f x)\right ) \tan ^5(e+f x) \, dx=\frac {(a-2 b) \sec ^4(e+f x)}{4 f}-\frac {(2 a-b) \sec ^2(e+f x)}{2 f}-\frac {a \log (\cos (e+f x))}{f}+\frac {b \sec ^6(e+f x)}{6 f} \]
[In]
[Out]
Rule 77
Rule 457
Rule 4223
Rubi steps \begin{align*} \text {integral}& = -\frac {\text {Subst}\left (\int \frac {\left (1-x^2\right )^2 \left (b+a x^2\right )}{x^7} \, dx,x,\cos (e+f x)\right )}{f} \\ & = -\frac {\text {Subst}\left (\int \frac {(1-x)^2 (b+a x)}{x^4} \, dx,x,\cos ^2(e+f x)\right )}{2 f} \\ & = -\frac {\text {Subst}\left (\int \left (\frac {b}{x^4}+\frac {a-2 b}{x^3}+\frac {-2 a+b}{x^2}+\frac {a}{x}\right ) \, dx,x,\cos ^2(e+f x)\right )}{2 f} \\ & = -\frac {a \log (\cos (e+f x))}{f}-\frac {(2 a-b) \sec ^2(e+f x)}{2 f}+\frac {(a-2 b) \sec ^4(e+f x)}{4 f}+\frac {b \sec ^6(e+f x)}{6 f} \\ \end{align*}
Time = 0.19 (sec) , antiderivative size = 55, normalized size of antiderivative = 0.76 \[ \int \left (a+b \sec ^2(e+f x)\right ) \tan ^5(e+f x) \, dx=\frac {b \tan ^6(e+f x)}{6 f}-\frac {a \left (4 \log (\cos (e+f x))+2 \tan ^2(e+f x)-\tan ^4(e+f x)\right )}{4 f} \]
[In]
[Out]
Time = 1.63 (sec) , antiderivative size = 55, normalized size of antiderivative = 0.76
method | result | size |
parts | \(\frac {a \left (\frac {\tan \left (f x +e \right )^{4}}{4}-\frac {\tan \left (f x +e \right )^{2}}{2}+\frac {\ln \left (1+\tan \left (f x +e \right )^{2}\right )}{2}\right )}{f}+\frac {b \tan \left (f x +e \right )^{6}}{6 f}\) | \(55\) |
derivativedivides | \(\frac {\frac {\sec \left (f x +e \right )^{6} b}{6}+\frac {\sec \left (f x +e \right )^{4} a}{4}-\frac {\sec \left (f x +e \right )^{4} b}{2}-\sec \left (f x +e \right )^{2} a +\frac {b \sec \left (f x +e \right )^{2}}{2}+a \ln \left (\sec \left (f x +e \right )\right )}{f}\) | \(70\) |
default | \(\frac {\frac {\sec \left (f x +e \right )^{6} b}{6}+\frac {\sec \left (f x +e \right )^{4} a}{4}-\frac {\sec \left (f x +e \right )^{4} b}{2}-\sec \left (f x +e \right )^{2} a +\frac {b \sec \left (f x +e \right )^{2}}{2}+a \ln \left (\sec \left (f x +e \right )\right )}{f}\) | \(70\) |
risch | \(i a x +\frac {2 i a e}{f}+\frac {-4 a \,{\mathrm e}^{10 i \left (f x +e \right )}+2 b \,{\mathrm e}^{10 i \left (f x +e \right )}-12 a \,{\mathrm e}^{8 i \left (f x +e \right )}-16 a \,{\mathrm e}^{6 i \left (f x +e \right )}+\frac {20 b \,{\mathrm e}^{6 i \left (f x +e \right )}}{3}-12 a \,{\mathrm e}^{4 i \left (f x +e \right )}-4 a \,{\mathrm e}^{2 i \left (f x +e \right )}+2 b \,{\mathrm e}^{2 i \left (f x +e \right )}}{f \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )^{6}}-\frac {a \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )}{f}\) | \(148\) |
[In]
[Out]
none
Time = 0.27 (sec) , antiderivative size = 69, normalized size of antiderivative = 0.96 \[ \int \left (a+b \sec ^2(e+f x)\right ) \tan ^5(e+f x) \, dx=-\frac {12 \, a \cos \left (f x + e\right )^{6} \log \left (-\cos \left (f x + e\right )\right ) + 6 \, {\left (2 \, a - b\right )} \cos \left (f x + e\right )^{4} - 3 \, {\left (a - 2 \, b\right )} \cos \left (f x + e\right )^{2} - 2 \, b}{12 \, f \cos \left (f x + e\right )^{6}} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 116 vs. \(2 (56) = 112\).
Time = 0.55 (sec) , antiderivative size = 116, normalized size of antiderivative = 1.61 \[ \int \left (a+b \sec ^2(e+f x)\right ) \tan ^5(e+f x) \, dx=\begin {cases} \frac {a \log {\left (\tan ^{2}{\left (e + f x \right )} + 1 \right )}}{2 f} + \frac {a \tan ^{4}{\left (e + f x \right )}}{4 f} - \frac {a \tan ^{2}{\left (e + f x \right )}}{2 f} + \frac {b \tan ^{4}{\left (e + f x \right )} \sec ^{2}{\left (e + f x \right )}}{6 f} - \frac {b \tan ^{2}{\left (e + f x \right )} \sec ^{2}{\left (e + f x \right )}}{6 f} + \frac {b \sec ^{2}{\left (e + f x \right )}}{6 f} & \text {for}\: f \neq 0 \\x \left (a + b \sec ^{2}{\left (e \right )}\right ) \tan ^{5}{\left (e \right )} & \text {otherwise} \end {cases} \]
[In]
[Out]
none
Time = 0.19 (sec) , antiderivative size = 95, normalized size of antiderivative = 1.32 \[ \int \left (a+b \sec ^2(e+f x)\right ) \tan ^5(e+f x) \, dx=-\frac {6 \, a \log \left (\sin \left (f x + e\right )^{2} - 1\right ) - \frac {6 \, {\left (2 \, a - b\right )} \sin \left (f x + e\right )^{4} - 3 \, {\left (7 \, a - 2 \, b\right )} \sin \left (f x + e\right )^{2} + 9 \, a - 2 \, b}{\sin \left (f x + e\right )^{6} - 3 \, \sin \left (f x + e\right )^{4} + 3 \, \sin \left (f x + e\right )^{2} - 1}}{12 \, f} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 280 vs. \(2 (66) = 132\).
Time = 1.59 (sec) , antiderivative size = 280, normalized size of antiderivative = 3.89 \[ \int \left (a+b \sec ^2(e+f x)\right ) \tan ^5(e+f x) \, dx=\frac {6 \, a \log \left ({\left | -\frac {\cos \left (f x + e\right ) + 1}{\cos \left (f x + e\right ) - 1} - \frac {\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1} + 2 \right |}\right ) - 6 \, a \log \left ({\left | -\frac {\cos \left (f x + e\right ) + 1}{\cos \left (f x + e\right ) - 1} - \frac {\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1} - 2 \right |}\right ) + \frac {11 \, a {\left (\frac {\cos \left (f x + e\right ) + 1}{\cos \left (f x + e\right ) - 1} + \frac {\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1}\right )}^{3} + 90 \, a {\left (\frac {\cos \left (f x + e\right ) + 1}{\cos \left (f x + e\right ) - 1} + \frac {\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1}\right )}^{2} + 276 \, a {\left (\frac {\cos \left (f x + e\right ) + 1}{\cos \left (f x + e\right ) - 1} + \frac {\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1}\right )} + 280 \, a - 128 \, b}{{\left (\frac {\cos \left (f x + e\right ) + 1}{\cos \left (f x + e\right ) - 1} + \frac {\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1} + 2\right )}^{3}}}{12 \, f} \]
[In]
[Out]
Time = 19.69 (sec) , antiderivative size = 52, normalized size of antiderivative = 0.72 \[ \int \left (a+b \sec ^2(e+f x)\right ) \tan ^5(e+f x) \, dx=\frac {\frac {a\,\ln \left ({\mathrm {tan}\left (e+f\,x\right )}^2+1\right )}{2}-\frac {a\,{\mathrm {tan}\left (e+f\,x\right )}^2}{2}+\frac {a\,{\mathrm {tan}\left (e+f\,x\right )}^4}{4}+\frac {b\,{\mathrm {tan}\left (e+f\,x\right )}^6}{6}}{f} \]
[In]
[Out]